<!DOCTYPE html>
<html>
<head>
    <title>JS 预览 【${className}】</title>
    <#include "/common/header.html"/>
</head>
<body>
</body>
<script type="text/javascript">
    if(window.opener){
        var html=window.opener.document.getElementById("${htmlId}").value;
        console.log(html);
        Ext.onReady(function(){
            try{
                if (window.execScript) {
                    window.execScript(html);
                } else {
                    window.eval(html);
                }
                var panel=Ext.create("${className}");;
                var viewport=Ext.create('Ext.container.Viewport',{layout:'fit',items:panel});
            }catch (e){
                console.log(e);
                alert("###编辑JS存在错误###\n"+e);
            }
        });
    }
</script>
</html>